#ifndef ENEMY_HH
#define ENEMY_HH

#include "ICharacter.hh"
#include "buffAndEffect.hh"
#include "randomFunc.hh"
#include <cmath>
//此类不实例化
class Aenemy : public ICharacter
{
protected:
    Aenemy();
    Aenemy(const Aenemy& other);
    Aenemy& operator=(const Aenemy& other);
    virtual ~Aenemy() = default;
    std::vector<unsigned> skill1_targets;
    std::vector<unsigned> skill2_targets;
    std::string name;
    std::string description;
    bool is_dead;
    unsigned maxHealth;
    unsigned health;
    int speed;
    int round_speed;
    unsigned position_inteam;
    // std::vector<buff_and_effect::Abuff> buffs;
    bool round_finsh;
    std::string skill1_name;
    std::string skill2_name;
    //以下属性为百分比
    unsigned blight;//毒抗
    unsigned bleed;//血抗
    unsigned stun;//晕抗
    unsigned dodge;//闪避
    double prot;//防御

public:
    bool isAlive() const override;//
    void takeDamage(unsigned damage) override;//
    void healing(unsigned healing_amount) override;//
    // void takeBuff(buff_and_effect::Abuff& buff) override;//
    // void removeBuff(buff_and_effect::Abuff& buff) override;//
    void modifyRoundSpeed(int new_speed) override;
    void sitRoundFinsh(bool b) override;
    void changePosInteam(unsigned new_pos) override;
    unsigned getSkillName() override;
    unsigned getskill1Target() override;
    unsigned getskill2Target() override;
    virtual void skill1(std::vector<ICharacter*>& team, std::vector<ICharacter*>& other_team, unsigned target_pos) = 0;
    virtual void skill2(std::vector<ICharacter*>& team, std::vector<ICharacter*>& other_team, unsigned target_pos) = 0;
    // Getters
    std::string getName() const override;//
    std::string getDescription() const override; //
    unsigned getMaxHealth() const override;//
    unsigned getHealth() const override;//
    unsigned getSpeed() const override;//
    int getRoundSpeed() const override;//
    unsigned getPosInteam() const override;//
    // std::vector<buff_and_effect::Abuff> getBuffs() const override;//
    bool getRoundFinsh() const override;
    std::string getskill1_name() const override;
    std::string getskill2_name() const override;

    unsigned getBlight() const override;//
    unsigned getBleed() const override;//
    unsigned getStun() const override;//
    unsigned getDodge() const override;//
    double getProt() const;//

    std::string toString() const override;//

    Aenemy& operator-=(unsigned damage) override; //For taking damage
    Aenemy& operator+=(unsigned healing_amount) override; //治疗 
};

//一实例化范类
// class waghh : public enemy
// {

// public:
//     waghh();
//     ~waghh() override;

//     void skill1(std::vector<hero> team, unsigned target_pos) override;
//     void skill2(std::vector<hero> team, unsigned target_pos) override;
// };


#endif